Skip to content

Bump json-schema-validator to 2.0.4 / 3.0.6, jackson to 2.21.1 / 3.1.4#1058

Merged
Kehrlann merged 1 commit into
modelcontextprotocol:mainfrom
joaodinissf:bump-json-schema-validator
Jul 8, 2026
Merged

Bump json-schema-validator to 2.0.4 / 3.0.6, jackson to 2.21.1 / 3.1.4#1058
Kehrlann merged 1 commit into
modelcontextprotocol:mainfrom
joaodinissf:bump-json-schema-validator

Conversation

@joaodinissf

Copy link
Copy Markdown
Contributor

Bumps json-schema-validator to 2.0.4 (Jackson 2) / 3.0.6 (Jackson 3) to adopt the OSGi class-loading fix, and moves the Jackson floors those releases require.

Fixes #992

Motivation and Context

DefaultJsonSchemaValidator eagerly loads the bundled Draft 2020-12 meta-schema, and json-schema-validator resolved it through the thread context class loader only — under OSGi that loader cannot see the validator's own jar, so every server failed at startup with FileNotFoundException: classpath:draft/2020-12/schema. Fixed upstream in networknt/json-schema-validator#1265 / networknt/json-schema-validator#1266, released as 3.0.6 / 2.0.4.

json-schema-validator 3.0.6 is built against Jackson 3.1.4 and requires jackson-annotations 2.21, so those floors move with it; jackson-annotations is shared through mcp-core, so the Jackson 2 line is aligned to 2.21.1.

How Has This Been Tested?

Two ways, independently:

  • I verified that this resolves an issue I encountered in an OSGi application — the same failure reported in JsonSchemaValidator fails to load schema in OSGi environments #992.
  • Separately, on a minimal embedded Apache Felix reproducer: with a thread context class loader that cannot see the bundled meta-schema, DefaultJsonSchemaValidator threw before this change and constructs cleanly after it, for both the Jackson 2 and Jackson 3 modules.

Module test suites pass locally.

Breaking Changes

None in the SDK itself (pom-only). The validator patch releases include upstream validation bug fixes, and the transitive Jackson floor rises (Jackson 3 → 3.1.4, jackson-annotations → 2.21, Jackson 2 → 2.21.1) — consumers pinning older Jackson will need to match it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling — n/a, dependency version bump only
  • I have added or updated documentation as needed — n/a

Additional context

pom-only change (5 version properties). The upstream regression was introduced in the schema-retrieval refactor (networknt/json-schema-validator#931) and affected every 2.x/3.x release until 2.0.4 / 3.0.6.

The validator resolved its bundled meta-schemas through the thread
context class loader only, which cannot see them under OSGi, so
DefaultJsonSchemaValidator failed at construction (modelcontextprotocol#992). Fixed
upstream in networknt/json-schema-validator#1265 / #1266 and released
in 3.0.6 / 2.0.4.

json-schema-validator 3.0.6 is built against Jackson 3.1.4 and
requires jackson-annotations 2.21, so those floors move with it; the
Jackson 2 line is aligned to 2.21.1. Verified with an embedded-Felix
reproducer: with a thread context class loader that cannot see the
bundled meta-schema, both validator modules now construct cleanly.

Fixes modelcontextprotocol#992
@Kehrlann Kehrlann self-requested a review July 8, 2026 09:59
@Kehrlann Kehrlann self-assigned this Jul 8, 2026
@Kehrlann Kehrlann added bug Something isn't working P2 Moderate issues affecting some users, edge cases, potentially valuable feature labels Jul 8, 2026
@Kehrlann Kehrlann added this to the 2.0.1 milestone Jul 8, 2026
@Kehrlann Kehrlann changed the title Bump json-schema-validator to 2.0.4 / 3.0.6 Bump json-schema-validator to 2.0.4 / 3.0.6, jackson to 2.21.1 / 3.1.4 Jul 8, 2026

@Kehrlann Kehrlann left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your upstream contribution 👏

@Kehrlann Kehrlann merged commit dea53fd into modelcontextprotocol:main Jul 8, 2026
21 checks passed
@joaodinissf joaodinissf deleted the bump-json-schema-validator branch July 8, 2026 10:07
@wjglerum wjglerum mentioned this pull request Jul 8, 2026
9 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P2 Moderate issues affecting some users, edge cases, potentially valuable feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JsonSchemaValidator fails to load schema in OSGi environments

2 participants